/**
 * 
 */
package com.thor.palmmall.rest.brand.converter;

import java.math.BigDecimal;
import java.util.ArrayList;

import org.springframework.core.convert.converter.Converter;


import com.thor.commons.entity.UCN;
import com.thor.commons.util.ConverterUtil;
import com.thor.palmmall.rest.common.OperateInfoConverter;
import com.thor.palmmall.rest.tenant.converter.ALogosConverter;
import com.thor.palmmall.rest.brand.ABrand;
import com.thor.palmmall.spi.brand.SBrand;

/**
 * @author Captain
 *
 * @since 1.0
 */
public class ABrandConverter implements Converter<SBrand, ABrand> {

  public static ABrandConverter getInstance() {
    if (instance == null)
      instance = new ABrandConverter();
    return instance;
  }

  private static ABrandConverter instance;

  private ABrandConverter() {
  }

  @Override
  public ABrand convert(SBrand source) {
    if (source == null) {
      return null;
    }
    ABrand target = new ABrand();
    target.setUuid(source.getUuid());
    target.setVersion(source.getVersion());
    target.setVersionTime(source.getVersionTime());
    target.setLastModifyInfo(OperateInfoConverter.getInstance().convert(source.getLastModifyInfo()));
    target.setCreateInfo(OperateInfoConverter.getInstance().convert(source.getCreateInfo()));
    target.setCode(source.getCode());
    target.setName(source.getName());
    target.setState(source.getState());
    target.setBizType(ABizTypeConverter.getInstance().convert(source.getBizType()));
    target.setBizTypePath(source.getBizTypePath());

    target.setStore(source.getStore());

    target.setBrandGrade(source.getBrandGrade());
    target.setShopCount(source.getShopCount());
    target.setPriceLow(source.getPriceLow());
    target.setPriceHigh(source.getPriceHigh());
    target.setTurnoverAvg(source.getTurnoverAvg());
    target.setRegion(source.getRegion());
    target.setFloor(source.getFloor());
    target.setAreaLow(source.getAreaLow());
    target.setAreaHigh(source.getAreaHigh());
    target.setRentLow(source.getRentLow());
    target.setRentHigh(source.getRentHigh());
    target.setEnvRequirement(source.getEnvRequirement());
    target.setBrandRequirement(source.getBrandRequirement());
    target.setPropertyRequirement(source.getPropertyRequirement());
    target.setCompanyName(source.getCompanyName());
    target.setCompanyAddress(source.getCompanyAddress());
    target.setContactWay(source.getContactWay());
    target.setRemark(source.getRemark());
    return target;

  }

}
